package ${basePackageName}.pojo;

import javax.persistence.*;
import com.baomidou.mybatisplus.annotation.*;
import com.xisoft.entity.ZSuperEntityVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
* @author：👨🏻LIBENCHENG <br>
* @phone：☎110 <br>
* @Email：📧550583975@QQ.COM <br>
* @description 类描述：${dName} ${COMMENTS}
* @create 创建时间：${createAt}
* @update 修改时间：${createAt}
*/
@lombok.Data
@Table(name = "${tablename?lower_case}")
@TableName (value = "${tablename?lower_case}")
@ApiModel (description = "${tablename?lower_case} ${COMMENTS}")
public class ${vName?cap_first}VO extends ZSuperEntityVo
{
<#list columns as column>
	/** description： ${column.COMMENTS} */
	public static String ${column.dName} = "${column.vName?uncap_first}";
</#list>
<#list columns as column>
	// ${column.COMMENTS}
	<#if column.primary >
	@Id
	@TableId (type = IdType.INPUT)
	</#if>
	@TableField (value = "${column.dName}")
	@Column (name = "${column.dName}")
	// @ApiModelProperty (value = "${column.COMMENTS}")
	@ApiModelProperty (value = "${column.COMMENTS}")
	private ${column.vType} ${column.vName?uncap_first};
</#list>

public ${vName?cap_first}VO( ) { }

<#list columns as column>
	/************************************************************* <br>
	 *
	 *说明: get(${column.COMMENTS})方法<br>
	 *
	 * @Description 方法描述：${column.COMMENTS} <br>
	 * @Date Created on ${createAt}  <br>
	 * @return java.lang.String  <br>
	 * @Author libencheng
	 * @version 1.0 <br>
	 ************************************************************* <br>
	 */
	public ${column.vType} get${column.vName?cap_first}( )
	{ return ${column.vName?uncap_first}; }

	/************************************************************* <br>
	 *
	 *说明: set(${column.COMMENTS})方法<br>
	 *
	 * @Description 方法描述：${column.COMMENTS} <br>
	 * @Date Created on ${createAt}  <br>
	 * @Param [${column.vName?uncap_first}] <br>
	 * @return void  <br>
	 * @Author xisoft
	 * @version 1.0 <br>
	 ************************************************************* <br>
	 */
	public void set${column.vName?cap_first}(${column.vType} ${column.vName?uncap_first})
	{ this.${column.vName?uncap_first} = ${column.vName?uncap_first};}

</#list>

<#list columns as column><#if column.primary >
	/** description 表主键 */
	public static String PRIMARY_KEY = ${column.dName};

	/************************************************************* <br>
	 *
	 *description: 获取主键 <br>
	 *
	 * @Description   <br>
	 * @Date Created on ${createAt}  <br>
	 * @return java.lang.String  <br>
	 * @Author xisoft
	 * @version 1.0 <br>
	 ************************************************************* <br>
	 */
	public static String getPrimarykey( ){ return ${column.dName};}
</#if></#list>

	/** description 表 ${table.COMMENTS}*/
	public static String TABLE_NAME  ="${tablename?lower_case}";

	/************************************************************* <br>
	 *
	 *说明: 获取表名 <br>
	 *
	 * @Description   <br>
	 * @Date Created on ${createAt}  <br>
	 * @return java.lang.String  <br>
	 * @Author libc
	 * @version 1.0 <br>
	 ************************************************************* <br>
	 */
	public static String getTableName( )
	{ return ${vName?cap_first}VO.class.getAnnotation(TableName.class).value(); }

	/************************************************************* <br>
	*
	*说明: 获取所有的字段名 <br>
	*
	* @Description   <br>
	* @Date Created on ${createAt}  <br>
	* @return java.lang.String  <br>
	* @Author licheng
	* @version 1.0 <br>
	************************************************************* <br>
	*/
	public static String[] getColumns( )
	{
		return new String []{<#list columns as column>${column.dName},
			</#list> };
	}

	/************************************************************* <br>
	 *
	 *说明: 重写tostring 方法，以map格式返回String <br>
	 *
	 * @Description   <br>
	 * @Date Created on ${createAt}  <br>
	 * @return java.lang.String   <br>
	 * @Author xisoft
	 * @version 1.0 <br>
	 ************************************************************* <br>
	 */
	@Override public String toString( )
	{
		return "{ ${tablename?lower_case} = {" +
<#list columns as column>                "<#if column_index  != 0>,</#if>${column.vName?uncap_first}=" + get${column.vName?cap_first}() +
		</#list>
		"}}";
	}
}
